package com.kainitram.drivebook.fragments;

import com.kainitram.library.sm.ContentFragmentCreator;
import com.kainitram.library.sm.SlidingContentFragment;

/**
 * Creators for Drive book content fragments
 * 
 * @author Mino
 * 
 */
public class FragmentCreators {

	public class PrintingFragmentCreator implements ContentFragmentCreator {

		private PrintingFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new PrintingFragment();
			}
			return mInstance;
		}
	}

	public class ExportFragmentCreator implements ContentFragmentCreator {

		private ExportFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new ExportFragment();
			}
			return mInstance;
		}
	}

	public class HomeFragmentCreator implements ContentFragmentCreator {

		private HomeFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new HomeFragment();
			}
			return mInstance;
		}
	}

	public class LogginFragmentCreator implements ContentFragmentCreator {

		private LogginFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new LogginFragment();
			}
			return mInstance;
		}
	}

	public class DrivesListFragmentCreator implements ContentFragmentCreator {

		private DrivesListFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new DrivesListFragment();
			}
			return mInstance;
		}
	}

	public class PlanningFragmentCreator implements ContentFragmentCreator {

		private PlanningFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new PlanningFragment();
			}
			return mInstance;
		}
	}

	public class CoastsListFragmentCreator implements ContentFragmentCreator {

		private CoastsListFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new CoastsListFragment();
			}
			return mInstance;
		}
	}

	public class CarsListFragmentCreator implements ContentFragmentCreator {

		private CarsListFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new CarsListFragment();
			}
			return mInstance;
		}
	}

	public class PartnersListFragmentCreator implements ContentFragmentCreator {

		private PartnersListFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new PartnersListFragment();
			}
			return mInstance;
		}
	}

	public class PassengersListFragmentCreator implements
			ContentFragmentCreator {

		private PassengersListFragment mInstance = null;

		@Override
		public SlidingContentFragment getContentFragmentInstance() {

			if (mInstance == null) {
				mInstance = new PassengersListFragment();
			}
			return mInstance;
		}
	}

}
